import 'package:bot_toast/bot_toast.dart';

class LoadingUtil {
  static CancelFunc? cancelFunc;

  static void showLoading() {
    hideLoading();
    cancelFunc ??= BotToast.showLoading(duration: const Duration(seconds: 6));
  }

  static void hideLoading() {
    cancelFunc?.call();
    cancelFunc = null;
  }
}
